<div data---="form__cmseditor.form__if:sourcecode;width:1100;submit:cmseditorsourcecode/submit;cancel:cmseditorsourcecode/cancel;title:@(Source-code);icon:code" class="hidden">

	<div class="padding">
		<div data---="codemirror__cmseditorsourcecode__height:500;required:true;tabs:true;trim:true">@(HTML)</div>
	</div>

	<nav data---="validation__cmseditorsourcecode">
		<button name="submit">@(APPLY)</button>
		<button name="cancel">@(Cancel)</button>
	</nav>

</div>

<script>

	PLUGIN('cmseditorsourcecode', function(exports) {

		exports.submit = function(hide) {
			cmseditor.instance.replace(cmseditorsourcecode);
			hide();
		};

		exports.cancel = function(hide) {
			var editor = cmseditor.instance;
			editor.resize();
			editor.load('sourcecode');
			hide();
		};

	});

</script>